package com.example;


/**
 * 常量工具类
 */
public class Contents
{
    //业务请求成功
    public static String requestSuccess = "200";

    //业务请求失败
    public static String requestFail = "201";

    public static String getMsg4Code(String code) {
        String str = "未知";
        switch (code) {
            case "100":
                str = "登录成功";
                break;
            case "101":
                str = "用户名或密码不正确";
                break;
            case "102":
                str = "用户未登陆或登陆超时";
                break;
            case "103":
                str = "两次Token不一致";
                break;
            case "104":
                str = "退出登录成功";
                break;
            case "105":
                str = "Webtoken验证不正确";
                break;
            case "106":
                str = "验证码输入不正确";
                break;
            case "107":
                str = "删除失败";
                break;
            case "108":
                str = "新增失败";
                break;
            case "109":
                str = "更新失败";
                break;
            case "110":
                str = "没有访问权限";
                break;
            case "200":
                str = "请求处理成功";
                break;
            case "201":
                str = "请求处理失败";
                break;
            default:
                str = "其他";
                break;
        }

        return str;
    }

}
